program perevorot;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
  pelement = ^element;
  element = record
    value: integer;
    next: pelement;
  end;

var
  fin: textfile;
  n, i, x, y, q: integer;
  head, addhead: pelement;

procedure AddToBegin (var head : pelement; num : integer);
  var tmp : pelement;
begin
  tmp:= head;
  new(head);
  head^.value:= num;
  head^.next:= tmp;
end;

procedure AddToEnd (var head : pelement; num : integer);
  var current : pelement;
begin
  if (head<>nil) then
begin
  current:= head;
  while(current^.next<>nil) do
  begin
    current:=current^.next;
  end;
    new(current^.next);
    current^.next^.value:=num;
    current^.next^.next:=nil;
  end else begin
    AddToBegin(head, num);
  end;
end;

function Delete (var head : pelement):integer;
  var tmp : pelement;
begin
  if (head <> nil) then
  begin
    tmp := head^.next;
    delete:= head^.value;
    dispose(head);
    head := tmp;
  end;
end;

begin
  assignfile(fin, 'input.txt');
  reset(fin);
  readln(fin, n);
  for i:=1 to n do
  begin
    read(fin, q);
    AddToBegin(head, q);
  end;
  if (n mod 2 =0) then
  begin
    x:=n div 2;
    y:=n div 2;
  end else
  begin
    x:=n-1 div 2;
    y:=n+1 div 2;
  end;
  for i:=1 to x do
  begin
    AddToEnd(addhead, head^.value);
    head:=head^.next;
  end;
  for i:=y to n do
  begin
    if(head<>nil) then
    begin
      AddToBegin(addhead, head^.value);
      if(head^.next<>nil) then
      begin
        head:=head^.next;
      end else begin
        break;
      end;
    end;
  end;
  for i:=1 to n do
  begin
    Delete(head);
    Delete(addhead);
  end;
  closefile(fin);
  readln;
end.
